package com.wthink.newMain.view

import android.app.Dialog
import android.content.Context
import android.os.Build
import android.view.Gravity
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import androidx.annotation.RequiresApi
import com.wthink.hzgj.R
import kotlinx.android.synthetic.main.dialog_change_up_down.*
import kotlinx.android.synthetic.main.dialog_change_up_down.back
import kotlinx.android.synthetic.main.dialog_quit_login.*
import kotlinx.android.synthetic.main.quit_login_dialog.*

class LoginQuitDialog : Dialog {
    constructor(context: Context) : this(context, 0)
    constructor(context: Context, themeResId: Int) : super(context, R.style.dialog) {
        setContentView(R.layout.dialog_quit_login)
        window?.setGravity(Gravity.CENTER)
        window?.setLayout(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT)
    }

    fun setOnclickListener(listener: View.OnClickListener) {
        if (sure !== null) {
            sure.setOnClickListener(listener)
        }
        if (back !== null) {
            back.setOnClickListener(listener)
        }
    }
}